<?php

namespace app\home\controller;

use app\common\controller\Backend;
use app\home\Common\FIdConst;
use app\home\Service\UserService;
use think\facade\View;

/**
 * 自定义表单Controller
 *
 * @author 李静波
 *
 */
class Form extends Backend
{

  /**
   * 自定义表单 - 主页面
   */
  public function index()
  {
    $us = new UserService();

    if ($us->hasPermission(FIdConst::FORM_SYSTEM)) {
      $this->initVar();

      View::assign("title", "自定义表单");

      return View::fetch();
    } else {
      $this->gotoLoginPage("/Home/Form/index");
    }
  }
}
